// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class Yang extends cc.Component {

    @property(cc.Node)
    yang: cc.Node = null;

  

    start () {
        
       this.scheduleOnce(()=>{
        // this.play(1);
       },5)
    }

    public state=0;

    public play(state)
    {
        if(state==1)  //默认
        {
           cc.tween(this.yang)
           .to(1,{scaleX:1.2})
           .to(1,{scaleX:1})
           .union()
           .repeat(1000000)
           .start();
        }
    }

}
